import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);
const state = {
  // 1 = 管理员 2 = 普通权限
  jurisdiction:1,
  breadcrumb:"欢迎"
};
const actions = {};
const mutations = {
  BREAD(store,value){ 
    switch (value) {
      case '/home/echart':
        store.breadcrumb = "数据分析"
      break;
      case '/home/personnel':
        store.breadcrumb = "人员管理"
      break;
      case '/home/user':
       store.breadcrumb = "账户管理"
      break;
      case '/home/dataAdmin':
       store.breadcrumb = "首页数据管理"
      break;
      case '/home/set':
        store.breadcrumb = "账号管理"
      break;
      case '/home/welcome':
        store.breadcrumb = "欢迎页"
      break;
      default:
        store.breadcrumb = "欢迎页"
      break;
    }
  }
};
const getters = {};

export default new Vuex.Store({
  state:state,
  actions,
  mutations,
  getters
})